import type {
  DetailOrdersMaintenance,
  PageOrdersByState,
  QueryOrdersCategoryAndId,
  QueryPageByOrdersByState,
  Result,
} from '@/config/data/data'
import { get } from './request'

/**
 * 根据状态分页查询订单信息
 * @param data 分页对象
 * @returns 多条信息
 */
export const ReqSelectOrdersPageByState = (
  data: QueryPageByOrdersByState
): Promise<Result<PageOrdersByState[]>> => get('/orders/page/category', data)

/**
 * 根据类型、id查询订单详情
 * @param data 参数对象
 * @returns 单条信息
 */
export const ReqSelectOrdersByIdAndCategory = (
  data: QueryOrdersCategoryAndId
): Promise<Result<DetailOrdersMaintenance>> => get('/orders/category/detail', data)
